package edu.uic.readfile;

import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Vector;

public class TrainingFileSet
{
	public ArrayList<SingleFile> trainingSet = new ArrayList();
	public int vectorsize = 0;
	public HashMap<String, SingleFile> fileMap = new HashMap();
	//public Vector<SingleFile> CList = new Vector();
	//public Vector<SingleFile> LList = new Vector();
	
	 
	
	public void addFile(SingleFile file)
	{
		trainingSet.add(file);
		fileMap.put(file.fileID, file);
		vectorsize = file.fileVector.size();
	}
	
	
	public void output(Writer writer)
	{
		try
		{
			for(SingleFile file : trainingSet)
			{
				for(Integer num : file.fileVector)
				{
					
						writer.write(num + " ");
					
				}
				writer.write("\n");
			}
			writer.close();
		} catch (IOException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
